package mocks

import (
	"context"

	"gitee.com/thewalkers/refactoring-code/model"
	"github.com/stretchr/testify/mock"
)

type MockEmployeeRepository struct {
	mock.Mock
}

// FindByID is mock of EmployeeRepository FindByID
func (m *MockEmployeeRepository) FindByID(ctx context.Context, id int64) (*model.Employee, error) {
	ret := m.Called(ctx, id)

	var r0 *model.Employee
	if ret.Get(0) != nil {
		r0 = ret.Get(0).(*model.Employee)
	}

	var r1 error
	if ret.Get(1) != nil {
		r1 = ret.Get(1).(error)
	}

	return r0, r1
}

func (m *MockEmployeeRepository) Create(ctx context.Context, e *model.Employee) error {
	ret := m.Called(ctx, e)

	var r0 error
	if ret.Get(0) != nil {
		r0 = ret.Get(0).(error)
	}

	return r0
}
